﻿using GameProject.Models;
using GameProject.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GameProject.Tests.MockObjects
{
	class MockAppRepository : IAppRepository
	{
		public IEnumerable<Models.UserProfile> Users { get; set; }
		public IEnumerable<Models.GameInstance> Games { get; set; }
		public IEnumerable<Models.GameType> GameTypes { get; set; }
		public bool Saved { get; set; }

		public IEnumerable<Models.UserProfile> GetUsers()
		{
			return Users;
		}

		public IEnumerable<Models.GameInstance> GetGames()
		{
			return Games;
		}

		public IEnumerable<Models.GameType> GetGameTypes()
		{
			return GameTypes;
		}

		public void Save()
		{
			Saved = true;
		}

		public void AddGameInstance(Models.GameInstance game)
		{
			var games = Games as List<GameInstance>;
			games.Add(game);
		}

		public void AddGameType(Models.GameType gameType)
		{
			throw new NotImplementedException();
		}
	}
}
